
// import { EventBus } from '@/utils/eventBus';
export default {
  methods: {
    handelMove(evt) {
      if (!evt.draggedContext || !evt.draggedContext.element) return false;
      if (!evt.to || !evt.to.className) return true;
      const limitSubTableType = [
        'grid', 'subform', 'linkForm', 'title', 'titleExplain',
        'workflowId', 'createTime', 'createUser', 'associatedApproval', 'richEditor'
      ]; // 限制这些type不能拖入子表单
      const limitGridType = ['grid', 'titleExplain', 'subform', 'linkForm', 'associatedApproval', 'richEditor', 'title']; // 限制这些type不能拖入栅格
      const type = evt.draggedContext.element.type;
      if (evt.to.className.indexOf('widget-subtable') >= 0 && limitSubTableType.includes(type)) {
        return false;
      }
      if (evt.to.className.indexOf('widget-grid-list') >= 0 && limitGridType.includes(type)) {
        return false;
      }
      return true;
    }
  }
};
